/*
** my_revstr.c for galaf in /home/compilation/galaf-lib
** 
** Made by christophe labonnemartinez
** Login   <labonn_c@epitech.net>
** 
** Started on  Fri Mar 23 04:48:55 2012 christophe labonnemartinez
** Last update Sat Aug 11 12:39:00 2012 christophe labonnemartinez
*/

#include "includes/my.h"

char	*my_revstr(char *str)
{
  int	i;
  int	j;
  char	*s2;

  i = 0;
  j = my_strlen(str) - 1;
  s2 = xmalloc(j + 1);
  while (str[i])
    {
      s2[i] = str[j];
      i++;
      j--;
    }
  s2[i] = '\0';
  return (s2);
}
